package com.alice.consumer.client.fallback;

import com.alice.consumer.client.ItemsClient;
import com.alice.consumer.pojo.Item;
import com.alice.consumer.pojo.ItemForm;
import com.alice.consumer.pojo.ItemVo;
import com.alice.consumer.utils.Result;
import org.springframework.stereotype.Component;

/**
 * Created by caoxuel on 2020/9/23 13:37
 */
@Component
public class ItemClientFallback implements ItemsClient {
    @Override
    public Result queryById(Integer id) {
        return Result.error().message("网络拥挤....");
    }

    @Override
    public Result queryAllItem() {
        return Result.error().message("网络拥挤....");
    }

    @Override
    public Result deleteItem(Integer id) {
        return Result.error().message("网络拥挤....");
    }

    @Override
    public Result addItem(ItemForm item) {
        return Result.error().message("网络拥挤....");
    }

    @Override
    public Result updateItem(ItemForm item) {
        return Result.error().message("网络拥挤....");
    }

    @Override
    public Result queryListPage(Integer page, Integer limit, ItemVo item) {
        return Result.error().message("网络拥挤....");
    }
}
